﻿using System.Web.Mvc;

namespace MVCHelper.Controllers
{

    
    /// <summary>
    /// Base controller
    /// </summary>
    public class BaseController : Controller
    {

        public string RootPath
        {
            get { return HttpContext.Request.MapPath("/"); }
        }
        
        protected ActionResult ResourceNotFound()
        {
            return View("PageNotFoundView");
        }

        protected override void OnException(ExceptionContext filterContext)
        {
            filterContext.ExceptionHandled = true;
            filterContext.Result = View("ExceptionView");
            base.OnException(filterContext);
        }
    }
}